home *** CD-ROM | disk | FTP | other *** search
/ PC Home 49 / PC_Home_Issue_49.iso / lldemo / lldemo.shr / ROSETTA.EXE / ROSETTA.DXR / 00589_guess scripts.ls < prev    next >
Encoding:
Text File  |  1996-06-24  |  1.6 KB  |  69 lines

  1. on doGuess which
  2.   global gChallengeOrder, gChallengeIndex, gMode, gCycle, gTimer, gResponseOrder, gBlindfold
  3.   go(gMode & "loop")
  4.   if char which of gResponseOrder = char gChallengeIndex of gChallengeOrder then
  5.     normalCenterSpeaker()
  6.     rightGuess(which)
  7.     nextChoice()
  8.   else
  9.     normalCenterSpeaker()
  10.     wrongGuess(#no, which)
  11.     doPage(gBlindfold, gCycle, gMode, gTimer)
  12.     if gCycle then
  13.       go(gMode & "cycle")
  14.     end if
  15.   end if
  16. end
  17.  
  18. on wrongGuess icon, which
  19.   global gWorth, gPage
  20.   alignYesNo(which, icon)
  21.   giveNoSnd()
  22.   if gWorth > 0 then
  23.     updateScore(gPage, -gWorth)
  24.     updateStage()
  25.     set gWorth to 0
  26.   end if
  27.   repeat while soundBusy(1) and not (the mouseDown)
  28.   end repeat
  29.   puppetSound(0)
  30.   hideOverlay()
  31.   updateStage()
  32. end
  33.  
  34. on rightGuess which
  35.   global gWorth, gPage, gPageScore
  36.   alignYesNo(which, #YES)
  37.   giveYeahSnd()
  38.   if gWorth > 0 then
  39.     set gPageScore to gPageScore + gWorth
  40.     updateScore(gPage, gWorth)
  41.     updateStage()
  42.   end if
  43.   repeat while soundBusy(1) and not (the mouseDown)
  44.   end repeat
  45.   puppetSound(0)
  46.   hideOverlay()
  47.   updateStage()
  48. end
  49.  
  50. on nextChoice
  51.   global gChallengeIndex, gResponseOrder, gWorth, gCycle, gTimer, gMode, gPage, gBlindfold, gFlowType
  52.   getPict(0)
  53.   if gChallengeIndex < 4 then
  54.     set gChallengeIndex to gChallengeIndex + 1
  55.     set gResponseOrder to line random(24) of the text of cast "Rand 4 List"
  56.     set gWorth to 5 - gChallengeIndex
  57.     drawText()
  58.     doPage(gBlindfold, gCycle, gMode, gTimer)
  59.     if gCycle then
  60.       go(gMode & "cycle")
  61.     end if
  62.   else
  63.     if gFlowType = #SCRAMBLE then
  64.       hideChallenge()
  65.     end if
  66.     endOfPage(gPage + 1)
  67.   end if
  68. end
  69.